package com.mjk.common.core.jdbc.ibatis.typehandler.handler;


import com.mjk.common.core.jdbc.ibatis.typehandler.BaseHandler;
import com.mjk.common.util.ObjectUtils;

import java.lang.reflect.Field;

public class LongHandler implements BaseHandler<Long> {

	@Override
	public String resovleToString(Field f,Long t) {
		if(ObjectUtils.isEmpty(t)){
			return null;
		}
		return t.toString();
	}

	@Override
	public Long resovleResult(Object o) {		
		return Long.valueOf(o.toString());
	}

}
